﻿package PinballCode {
	
	import flash.display.Shape;
	
	// Rectangle class
	public class Rectangle extends Shape {
		protected var ht:int;
		protected var widt:int;
		protected var color:uint;
		
		// Constructor
		public function Rectangle(ht:int=40, widt:int=100, color:uint=0xff0000) {
			this.ht = ht;
			this.widt = widt;
			this.color = color;
			init();
		}
		
		// initates the rectangle
		public function init():void {
			graphics.clear();
			graphics.beginFill(color);
			graphics.drawRect(0, 0, widt, ht); 
			graphics.endFill();
		}
	}
}
